//
//  BackgroundLayer.cpp
//  Seek&Hide
//
//  Created by 齐思 陈 on 13-10-5.
//
//

#include "BackgroundLayer.h"
#include "MiniMapLayer.h"

BackgroundLayer::BackgroundLayer() : m_pTMXTiledMap(NULL){
}

BackgroundLayer::~BackgroundLayer() {
    CC_SAFE_RELEASE(m_pTMXTiledMap);
}

BackgroundLayer* BackgroundLayer::create() {
	BackgroundLayer* pRet = new BackgroundLayer();
	pRet->init();
	pRet->autorelease();
	return pRet;
}

bool BackgroundLayer::init() {

	if ( !CCLayer::init() ) {
		 return false;
	}

    CCTMXTiledMap* background = CCTMXTiledMap::create("iso-test-zorder.tmx");
    setTMXTiledMap(background);
    
    background->setAnchorPoint(ccp(0,0));
    background->setPosition(ccp(0,0));
    addChild(getTMXTiledMap());
    
	return true;
}

